package org.jctc.els.modules.biz.service.projects.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.jctc.els.modules.biz.entity.projects.ElsProjectReportJigai;
import org.jctc.els.modules.biz.mapper.projects.ElsProjectReportJigaiMapper;
import org.jctc.els.modules.biz.service.projects.IElsProjectReportJigaiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ElsProjectReportJigaiServiceImpl implements IElsProjectReportJigaiService {

    @Autowired
    private ElsProjectReportJigaiMapper jigaiMapper;

    @Override
    public ElsProjectReportJigai getProjectId(Long projectId) {
        return jigaiMapper.selectOne(new QueryWrapper<ElsProjectReportJigai>().eq("project_id",projectId));
    }

    @Override
    public Integer save(ElsProjectReportJigai reportJigai) {
        return jigaiMapper.insert(reportJigai);
    }

    @Override
    public Integer update(ElsProjectReportJigai reportJigai) {
        return jigaiMapper.updateById(reportJigai);
    }
}
